package www.sofn.com.shopping.cart.domain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

@Schema(description = "添加购物车")
@Accessors(chain = true)
@Data
public class AddShoppingCartVO {
    @Schema(description = "商品Id")
    @NotNull(message = "商品Id不能为空")
    private String goodsId;//商品Id
    @Schema(description = "规格IdId")
    @NotNull(message = "规格Id不能为空")
    private String goodsAttrId;//规格Id
    @Schema(description = "商品数量")
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1,message = "商品数量不能小于{value}")
    @Max(value = 100,message = "商品数量不能大于{value}")
    private Integer goodsNum; //商品数量
}
